CMake with Eclipse

Cmake supports CDT4 and higher versions.

1
cmake -help  # check the supported generator

  1. Install CDT to Eclipse: http://www.eclipse.org/cdt/downloads.php

  2. The eclipse build directory should be sibling directory of the source directory.

    1
    2
    3
    mkdir eclipse
    cd eclipse
    cmake -G "Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ../src_folder # note that CMAKE_BUILD_TYPE can be set as Debug or Release

cmake --build . --config Release is equivalent to make

cmake --build . --target install --config Release is equivalent to make install